import request from '@/utils/request.js'

const prev = '/asset/inventory/';

export default {
  // 查询列表
  list: function(query, pageReq) {
    return request({
      url: `${prev}list`,
      method: 'post',
      data: query,
      params: pageReq
    })
  },
  // 查询详情
  detail: function(row) {
    return request({
      url: `${prev}${row.id}`,
      method: 'get'
    })
  },
  // 保存
  save: function(params) {
    return request({
      url: `${prev}save`,
      method: 'post',
      data: params
    })
  },
  // 提交
  start: function(id) {
    return request({
      url: `${prev}start/`+id,
      method: 'post'
    })
  },
  del: function (id) {
    return request({
      url: `${prev}/`+id,
      method: 'delete'
    })
  },
  inventory() {
    return request({
      url: `${prev}/inventory`,
      method: 'put'
    })
  }
}

